package CS4310.csueb.items;

import CS4310.csueb.visual.ItemSprite;

/**
 * Implementation for any given item in the game.
 * Items can be equipable or not and come with a
 * set drop rate and name.
 *
 * @author Levester Chaney
 *
 */
public abstract class Item
{
	private String name;
	private boolean equipable;
	private double dropRate;
	private int power;
	//power of the item: e.g. how much attack weapon has,
	//or how much hp does food replenish.
	//key items either have power of 0 or we can implement power
	//in each of weapon, food, armor, and shoe classes 
	//(rewrite same code 5 times) -Bikas
 
	public Item(String name, boolean equipable, double dropRate, int power)
	{
		this.name = name;
		this.equipable = equipable; 
		this.dropRate = dropRate;
		this.power = power;
	}

	/**
	 * Checks whether or not the item can be equipped or not.
	 * @return true if the item can be equipped and false otherwise
	 */
	public boolean isEquipable()
	{
		return this.equipable;
	}
	
	/**
	 * Retrieves the drop rate for the given item.
	 * @return the drop rate for the item
	 */
	public double getDropRate()
	{
		return this.dropRate;
	}
	
	/**
	 * Retrieves the power for the given item.
	 * @return the power for the item
	 */
	public int getPower()
	{
		return this.power;
	}
		
	/**
	 * Retrieves the name of the item
	 */
	public String toString()
	{
		return this.name;
	}

}
